{# One card per macro: its signature and notes from the source, the example rendered live, and the example's code. #} {% from "components/macros/layout.html" import card, code_block %}
{% for macro in macros %} {% call card(id="macro-" ~ macro.name) %}
{{ macro.signature }} {% if macro.doc %}

{{ macro.doc }}

{% endif %}
{% if macro.error %} {% elif macro.preview is none %}

Code only: it acts on the whole page.

{% else %}{{ macro.preview }}{% endif %}
{{ code_block(macro.example, lang="html+jinja") }}
{% endcall %} {% endfor %}